/* GUI CONVERTED from rescmta.p (converter v1.76) Wed Jan 23 14:49:46 2002 */
/* rescmta.p   - SHOP CALENDAR MAINTENANCE SHIFT ENTRY             */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/* $Revision: 1.7.1.2 $                                                         */
/*V8:ConvertMode=Maintenance                                            */
/* REVISION: 7.0     LAST MODIFIED: 05/05/92    BY: emb *F472*/
/* REVISION: 7.3     LAST MODIFIED: 09/08/93    BY: emb *GE99*/
/* REVISION: 7.3     LAST MODIFIED: 10/19/94    BY: ljm *GN40*/
/* REVISION: 7.3     LAST MODIFIED: 10/24/94    BY: ljm *GN54*/
/* REVISION: 7.0     LAST MODIFIED: 04/24/95    BY: ais *F0P6*/
/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane */
/* REVISION: 8.6E     LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan   */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan   */
/* REVISION: 9.1      LAST MODIFIED: 08/11/00   BY: *N0J4* Mudit Mehta  */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* $Revision: 1.7.1.2 $    BY: Annasaheb Rahane      DATE: 01/18/02  ECO: *N180*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/
{mfdeclre.i}
{gplabel.i} /* EXTERNAL LABEL INCLUDE */

define input parameter shft_recno as recid.
define input parameter ii as integer.
define shared variable shft_h_start1 as character format "99:99".
define shared variable shft_h_start2 as character format "99:99".
define shared variable shft_h_start3 as character format "99:99".
define shared variable shft_h_start4 as character format "99:99".
define variable colLabel as character no-undo extent 5.

define shared frame c1.
define shared frame c2.
define shared frame c3.
define shared frame c4.
define shared frame c5.
define shared frame c6.
define shared frame c7.

{rescfm.i c1 "SUNDAY_SHIFTS"}
{rescfm.i c2 "MONDAY_SHIFTS"}
{rescfm.i c3 "TUESDAY_SHIFTS"}
{rescfm.i c4 "WEDNESDAY_SHIFTS"}
{rescfm.i c5 "THURSDAY_SHIFTS"}
{rescfm.i c6 "FRIDAY_SHIFTS"}
{rescfm.i c7 "SATURDAY_SHIFTS"}

/* REWROTE PROGRAM TO USE shft_h_start* AND MAKE BETTER USE OF .i */
find shft_det no-lock where recid(shft_det) = shft_recno no-error.

if available shft_det then do:
   shft_h_start1 = string(truncate(shft_start1,0), "99") +
      string((shft_start1 - truncate(shft_start1,0)) * 60, "99").
   shft_h_start2 = string(truncate(shft_start2,0), "99") +
      string((shft_start2 - truncate(shft_start2,0)) * 60, "99").
   shft_h_start3 = string(truncate(shft_start3,0), "99") +
      string((shft_start3 - truncate(shft_start3,0)) * 60, "99").
   shft_h_start4 = string(truncate(shft_start4,0), "99") +
      string((shft_start4 - truncate(shft_start4,0)) * 60, "99").

   if ii = 1 then do with frame c1:
      {rescfm1.i c1}
   end.
   else
      if ii = 2 then do with frame c2:
      {rescfm1.i c2}
   end.
   else
      if ii = 3 then do with frame c3:
      {rescfm1.i c3}
   end.
   else
      if ii = 4 then do with frame c4:
      {rescfm1.i c4}
   end.
   else
      if ii = 5 then do with frame c5:
      {rescfm1.i c5}
   end.
   else
      if ii = 6 then do with frame c6:
      {rescfm1.i c6}
   end.
   else
      if ii = 7 then do with frame c7:
      {rescfm1.i c7}
   end.
end.
